import request from '@/utils/request'
/**
 * @description 从业经历
 */

function userPost (query) {
    return request({
        url: '/system/userPost/list',
        method: 'get',
        params: query
    })
}

/**
 * @description 添加从业经历
 */

function addUserPost (data) {
    return request({
        url: '/system/userPost',
        method: 'post',
        data: data
    })
}

/**
 * 
 * @description 修改从业经历
 */

function modifiUserPost (data) {
    return request({
        url: '/system/userPost',
        method: 'put',
        data: data
    })
}

/**
 * @description 删除从业经历
 */

function deleteUserPost (id) {
    return request({
        url: `/system/userPost/${id}`,
        method: 'delete',
    })
}

/**
 * @description 证件信息
 */

function certificateInfo (query) {
    return request({
        url: '/system/info/list',
        method: 'get',
        params: query
    })
}


/**
 * 
 * @description 修改证件信息
 */

function modifiCertificateInfo (data) {
    return request({
        url: '/system/info',
        method: 'put',
        data: data
    })
}
/**
 * @description 添加证件信息
 */

function addCertificateInfo (data) {
    return request({
        url: '/system/info',
        method: 'post',
        data: data
    })
}
/**
 * @description 删除证件信息
 */

function deleteCertificateInfo (id) {
    return request({
        url: `/system/info/${id}`,
        method: 'delete',
    })
}
/**
 * @description 诚信信息
 */

function recordInfo (data) {
    return request({
        url: '/system/record/list',
        method: 'get',
        params: data
    })
}

/**
 * @description 添加诚信信息
 */

function addRecordInfo (data) {
    return request({
        url: '/system/record',
        method: 'post',
        data: data
    })
}

/**
 * 
 * @description 修改诚信信息
 */

function modifiRecordInfo (data) {
    return request({
        url: '/system/record',
        method: 'put',
        data: data
    })
}

/**
 * @description 删除诚信信息
 */

function deleteRecordInfo (id) {
    return request({
        url: `/system/record/${id}`,
        method: 'delete',
    })
}

/**
 * @description 用户信息统计
 */

function userStatistics (data) {
    return request({
        url: '/system/user/statistics',
        method: 'get',
        params: data
    })
}


/**
 * @description 月度用户统计
 */

function userStatisticsByMonth (data) {
    return request({
        url: '/system/user/statisticsByMonth',
        method: 'get',
        params: data
    })
}


export {
    userPost,
    addUserPost,
    certificateInfo,
    addCertificateInfo,
    recordInfo,
    addRecordInfo,
    deleteUserPost,
    modifiUserPost,
    deleteCertificateInfo,
    modifiCertificateInfo,
    deleteRecordInfo,
    modifiRecordInfo,
    userStatistics,
    userStatisticsByMonth
}